'use strict';

var mongoose = require('mongoose');
var modelPlugin = require("../model.plugin");
var Schema = mongoose.Schema;
var ObjectId  = Schema.ObjectId;

var relationSchema = new Schema({
  name: {type: String, required: true},
  description: {type: String},
  userId: {type: ObjectId, ref: 'User'},
  friends: [{type: ObjectId, ref: 'User'}]
});

relationSchema.plugin(modelPlugin);
// relationSchema.index({feature: 1});

mongoose.model('Relation', relationSchema);
